home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / utility / bootany.zip / BOOTANY.H < prev    next >
Text File  |  1990-10-26  |  2KB  |  47 lines

  1. #define Numeric         0x30       /* First numeric value          */
  2. #define BootLocation    0x7C00     /* Address where DOS loads boot */
  3. #define BootSeg         0x7C0      /* Segment where DOS loads boot */
  4. #define NewBootLocation 0x7C00     /* Relocation Address           */
  5. #define NewBootSeg      0x7C0      /* Relocation Segment           */
  6. #define PartAddr        0x1BE      /* Offset to partition table    */
  7. #define ValidationAddr  0x1FE      /* Offset to validation bytes   */
  8. #define KeyboardFlags   0x417      /* Address of keyboard mask     */
  9. #define NumLockOff      0xDF       /* Mask to turn numlock off     */
  10. #define NumLockOn       0xFF       /* Mask to leave numlock on     */
  11. #define max_partitions  3          /* Can't fit any more           */
  12. #define part_text_len   15         /* max bytes for partition desc */
  13.  
  14. typedef struct PartitionEntry
  15.   {
  16.     char     bootIndicator;
  17.     char     beginHead;
  18.     char     beginSector;
  19.     char     beginCyl;
  20.     char     systemId;
  21.     char     endHead;
  22.     char     endSector;
  23.     char     endCyl;
  24.     short    relSectorLow;
  25.     short    relSectorHigh;
  26.     short    numSectorsLow;
  27.     short    numSectorsHigh;
  28.   } PartitionEntry;
  29.  
  30. typedef struct PartData
  31.   {
  32.     char     partition;
  33.     char     text[part_text_len];
  34.     char     term;
  35.   } PartData;
  36.  
  37. #define PartDataLen (sizeof(PartData) * max_partitions)
  38.  
  39. typedef struct BootData
  40.   {
  41.     PartData       partDesc[max_partitions];
  42.     char           numlockMask;
  43.     PartitionEntry partEntry[4];
  44.   } BootData;
  45.  
  46. #define DataAddr (ValidationAddr - sizeof(BootData))
  47.